/**
 * 
 */
package com.treehouse.northlight.component;

import com.artemis.Component;
import com.badlogic.gdx.math.Rectangle;

/**
 * Component Class.
 * 
 * Selection box for mouse interactions on entities.
 * 
 * @author Julian Biermann
 * @version 1.0 04.03.2013
 * 
 */
public class SelectionBox extends Component {

	private Rectangle rectangle;

	/**
	 * Constructor
	 */
	public SelectionBox(Rectangle rectangle) {
		this.rectangle = rectangle;
	}

	/**
	 * Constructor
	 * 
	 * @param x
	 *            coordinate.
	 * @param y
	 *            coordinate.
	 * @param width
	 *            of rectangle.
	 * @param height
	 *            of rectangle.
	 */
	public SelectionBox(float x, float y, float width, float height) {
		this.rectangle = new Rectangle(x, y, width, height);
	}

	/**
	 * @param x
	 *            coordinate to be set
	 */
	public void setX(float x) {
		this.rectangle.setX(x);
	}

	/**
	 * @param y
	 *            coordinate to be set
	 */
	public void setY(float y) {
		this.rectangle.setY(y);
	}

	/**
	 * @param width
	 *            to be set
	 */
	public void setWidth(float width) {
		this.rectangle.setWidth(width);
	}

	/**
	 * @param height
	 *            to be set
	 */
	public void setheight(float height) {
		this.rectangle.setHeight(height);
	}

	/**
	 * @return x coordinate
	 */
	public float getX() {
		return this.rectangle.getX();
	}

	/**
	 * @return y coordinate
	 */
	public float getY() {
		return this.rectangle.getY();
	}

	public float getWidth() {
		return this.rectangle.getWidth();
	}

	public float getHeight() {
		return this.rectangle.getHeight();
	}

	/**
	 * @return rectangle as Rectangle
	 */
	public Rectangle getRectangle() {
		return rectangle;
	}

	/**
	 * @param rectangle
	 *            sets the value of field rectangle
	 */
	public void setRectangle(Rectangle rectangle) {
		this.rectangle = rectangle;
	}
}
